package cn.shangqizhenshuai.extend.entity;

import java.util.List;

/**
 * 扩展模型
 */
public class ExtendsSqlModel {

    //方法名称
    public  String name;
    //传入参数类型（和mybatis一样需要传入对象类型时则填写表名）
    public  String parameter_tabname_or_basicDataType;
    //返回值参数类型（和mybatis一样需要传入对象类型时则填写表名）
    public  String resultMap_tabname_or_basicDataType;
    //具体的sql语句（支持mybatis 中所有标签）
    public String sql;
    //备注
    public String remark;
    //自定义返回参数
    public String resultMap_ref;
    //自定义输入参数
    public String parameter_ref;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParameter_tabname_or_basicDataType() {
        return parameter_tabname_or_basicDataType;
    }

    public void setParameter_tabname_or_basicDataType(String parameter_tabname_or_basicDataType) {
        this.parameter_tabname_or_basicDataType = parameter_tabname_or_basicDataType;
    }

    public String getResultMap_tabname_or_basicDataType() {
        return resultMap_tabname_or_basicDataType;
    }

    public void setResultMap_tabname_or_basicDataType(String resultMap_tabname_or_basicDataType) {
        this.resultMap_tabname_or_basicDataType = resultMap_tabname_or_basicDataType;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getResultMap_ref() {
        return resultMap_ref;
    }

    public void setResultMap_ref(String resultMap_ref) {
        this.resultMap_ref = resultMap_ref;
    }

    public String getParameter_ref() {
        return parameter_ref;
    }

    public void setParameter_ref(String parameter_ref) {
        this.parameter_ref = parameter_ref;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ExtendsSqlModel that = (ExtendsSqlModel) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (parameter_tabname_or_basicDataType != null ? !parameter_tabname_or_basicDataType.equals(that.parameter_tabname_or_basicDataType) : that.parameter_tabname_or_basicDataType != null)
            return false;
        if (resultMap_tabname_or_basicDataType != null ? !resultMap_tabname_or_basicDataType.equals(that.resultMap_tabname_or_basicDataType) : that.resultMap_tabname_or_basicDataType != null)
            return false;
        if (sql != null ? !sql.equals(that.sql) : that.sql != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (resultMap_ref != null ? !resultMap_ref.equals(that.resultMap_ref) : that.resultMap_ref != null)
            return false;
        return parameter_ref != null ? parameter_ref.equals(that.parameter_ref) : that.parameter_ref == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (parameter_tabname_or_basicDataType != null ? parameter_tabname_or_basicDataType.hashCode() : 0);
        result = 31 * result + (resultMap_tabname_or_basicDataType != null ? resultMap_tabname_or_basicDataType.hashCode() : 0);
        result = 31 * result + (sql != null ? sql.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (resultMap_ref != null ? resultMap_ref.hashCode() : 0);
        result = 31 * result + (parameter_ref != null ? parameter_ref.hashCode() : 0);
        return result;
    }
}
